package com.woniuxy01;

/**
 * @author 作者
 * @create 2025-07-24 14:30
 */
public class Test04 {
    public static void main(String[] args) {
        Animal animal = new Animal();
        Dog dog = new Dog();
        Cat cat = new Cat();

        System.out.println(animal instanceof Animal);
//        dog=animal;
        System.out.println(animal instanceof Dog);
        System.out.println(dog instanceof Dog);
//        animal=dog;
        System.out.println(dog instanceof Animal);
    }
}
